﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

/// <summary>
/// 所有按钮的显示隐藏
/// </summary>
public class CallUpButtons : MonoBehaviour

{
    public Button[] btn;
    public static CallUpButtons Instance;

    // Quaternion rotation;
    void Awake()
    {
        Instance = this;
        btn = transform.GetComponentsInChildren<Button>(true);
    }


    /// <summary>
    /// 显示按钮
    /// </summary>
    public void ShowButtons()
    {
        for (int i = 0; i < btn.Length; i++)
        {
            btn[i].gameObject.SetActive(true);
        }
    }

    /// <summary>
    /// 隐藏按钮
    /// </summary>
    public void HideButtons()
    {
        for (int i = 0; i < btn.Length; i++)
        {
            btn[i].gameObject.SetActive(false);
        }
    }
   


}
